﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Chinaer.DTO;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.ComponentModel;

namespace Chinaer.WCF.Contracts
{
    /// <summary>
    /// 登陆相关接口
    /// </summary>
    public partial interface IChinaer
    {
        /// <summary>
        /// 商家登陆
        /// </summary>
        /// <param name="shangjiaDTO"></param>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "POST",
            BodyStyle = WebMessageBodyStyle.Bare,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json,
            UriTemplate = "LoginShangJia")]
        [Description("商家登陆")]
        ShangJiaDTO LoginShangJia(ShangJiaDTO shangjiaDTO);
        /// <summary>
        /// 商家登陆
        /// </summary>
        /// <param name="shangjiaDTO"></param>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "GET",
            BodyStyle = WebMessageBodyStyle.Bare,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json,
            UriTemplate = "LoginShangJiaByNameAndPassword/{loginName}/{loginPassword}")]
        [Description("商家登陆")]
        DTO.ShangJiaDTO LoginShangJiaByNameAndPassword(string loginName, string loginPassword);

        /// <summary>
        /// 管理员登陆
        /// </summary>
        /// <param name="administratorDTO"></param>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "POST",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "LoginAdministrator")]
        [Description("管理员登陆")]
        AdministratorDTO LoginAdministrator(AdministratorDTO administratorDTO);

        /// <summary>
        /// 管理员登陆
        /// </summary>
        /// <param name="administratorDTO"></param>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "GET",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "LoginAdministratorByNameAndPassword/{loginName}/{loginPassword}")]
        [Description("根据用户名和密码管理员登陆")]
        AdministratorDTO LoginAdministratorByNameAndPassword(string loginName,string loginPassword);



        /// <summary>
        /// 顾客登陆
        /// </summary>
        /// <param name="customerDTO"></param>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "POST",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "LoginCustomer")]
        [Description("顾客登陆")]
        CustomerDTO LoginCustomer(CustomerDTO customerDTO);

        /// <summary>
        /// 员工登陆
        /// </summary>
        /// <param name="employeeDTO"></param>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "POST",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "LoginEmployee")]
        [Description("员工登陆")]
        EmployeeDTO LoginEmployee(EmployeeDTO employeeDTO);


    }
}
